<template>
  <el-container style="height: 910px; border: 1px solid #eee">
    <el-container>
      <el-header style="text-align: right; font-size: 20px">
        <el-dropdown>
          <i class="el-icon-setting" style="margin-right: 5px"></i>
          <el-dropdown-menu slot="dropdown">
            <el-dropdown-item>注销</el-dropdown-item>
          </el-dropdown-menu>
        </el-dropdown>
        <span>{{userid}}</span>
      </el-header>

      <el-main class="main">

         <div class="line">
			<div align="center" style="font-size: 19px;">
				用户：{{userid}}&emsp;&emsp;&emsp;电子账户：{{cardid}}
				<!-- <div class="showTime">当前时间：2021年3月16 20:35:16</div> -->
			 </div>
            <div>
              <el-button @click="Deposit" icon="el-icon-circle-plus" class="bt">存款</el-button>
              <el-button @click="Withdraw" icon="el-icon-remove" class="bt">取款</el-button>
              <el-button @click="TransferAccounts" icon="el-icon-edit" class="bt">转账</el-button>
            </div>
            <div>
              <el-button @click="Extract" icon="el-icon-s-promotion" class="bt">提现</el-button>
              <el-button @click="WaterSingle" icon="el-icon-bell" class="bt">查询流水</el-button>
              <el-button @click="QueryMoney" icon="el-icon-search" class="bt">查询余额</el-button>
            </div>
            <div>
              <el-button @click="UserInfo" icon="el-icon-s-home" class="bt">个人信息</el-button>
              <el-button @click="AddCard" icon="el-icon-circle-plus-outline" class="bt">绑定银行卡</el-button>
              <el-button @click="Back" icon="el-icon-s-help" class="bt">返回</el-button>
            </div>
          </div>
      </el-main>
    </el-container>
  </el-container>
</template>
<script>
  export default {
    data() {
      const item = {
        date: '2016-05-02',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      };
      return {
		  userid:'',
		  cardid:'',
        tableData: Array(20).fill(item)
      }
    },
	methods: {
		  Deposit() {
			  this.$router.push('/Deposit');
		  },
		  Withdraw() {
		  			  this.$router.push('/Withdraw');
		  },
		  TransferAccounts() {
		  			  this.$router.push('/TransferAccounts');
		  },
		  Extract() {
		  			  this.$router.push('/Extract');
		  },
		  WaterSingle() {
		  			  this.$router.push('/WaterSingle');
		  },
		  QueryMoney() {
		  			  this.$router.push({path:'/QueryMoney',query:{userId:'1'}});
		  },
		  UserInfo() {
		  			  this.$router.push('/UserInfo');
		  },
		  AddCard() {
		  			  this.$router.push('/AddCard');
		  },
		  Back() {
		  			  this.$router.push('/ElEmail');
		  },
	},
	mounted(){
		var that=this;
		var usersid=JSON.parse(window.localStorage.getItem("userid"));
		var id=JSON.parse(window.localStorage.getItem("id"));
		that.userid=usersid;
		that.cardid=id;
		//我这里能拿到返回来的电子账户
		// this.$axios.post('http://localhost:8086/dormitorydisinfectioncount/queryDormitoryDisinfection',{
		// 		enterpriseid:users.enterpriseid
		// }).then(function (res) {
		// 		//console.log(res.data);
		// 		for(let i=0;i<10;i++){
		// 			if(res.data[i]==null){
		// 					 break;
		// 			}
		// 			that.tableData2[i]=res.data[i];
		// 		}
		// 		that.tableData=that.tableData2;
		// 		that.tableData1=res.data;
		// 		that.title=res.data.length;
		// 		that.json_data=res.data;
		// 	}).catch(function(err) {
		// 			console.log(err);
		// 	});
	},
  };
</script>
<style>
  .bt{
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    margin-left: 110px;
    margin-top: 60px;
	margin-right: 50px;
	width: 150px;
	height: 80px;
	font-size: 18px;
	font-family: "courier new";
	
  }
  .line{
    height: 500px;
    width: 800px;
    margin: auto;
	margin-top: 100px;
    /* padding: 0px; */
  }
  .el-header {
      background-color: #aaaaff;
      color: #333;
      line-height: 60px;
    }

    .el-aside {
      color: #333;
    }
	.main{
		background-image: url(../../img/system.jpeg);
	}
</style>

